﻿using Reflection.Library.DAL;
using Reflection.Library.Factory;
using Reflection.Library.IDAL;
using Reflection.Library.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Reflection.Library.Framework.AttributeExtend;

namespace Reflection.Prject
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("开始测试：");
            //IBaseDAL baseDAL = new BaseDAL();
            IBaseDAL baseDAL = DALFactory.CreateInstance();
            Company company = baseDAL.Find<Company>(1);
            //List<Company> list = baseDAL.FindAll<Company>();

            //baseDAL.Delete<Company>(2);
            company.Name = "测试更新数据13412341432";
            //company.Validate();
            baseDAL.Update(company);
            //User user = baseDAL.Find<User>(1);
            //List<User> users = baseDAL.FindAll<User>();

            //Company insertCom = new Company()
            //{
            //    Name = "插入数据",
            //    CreatorId = 1,
            //    CreateTime = DateTime.Now,
            //    LastModifierId = 2,
            //    LastModifyTime = DateTime.Now
            //};
            //baseDAL.Insert<Company>(insertCom);


            Console.WriteLine();
        }
    }
}
